mtree = ostree_mutable_tree_new ();
- if (argc == 1 && (opt_trees == NULL || opt_trees[0] == NULL))
+ if (argc <= 1 && (opt_trees == NULL || opt_trees[0] == NULL))
{
char *current_dir = g_get_current_dir ();
arg = g_file_new_for_path (current_dir);
cancellable, error))
goto out;
}
- else
+ else if (opt_trees != NULL)
{
const char *const*tree_iter;
const char *tree;
}
}
}
+ else
+ {
+ g_assert (argc > 1);
+ arg = g_file_new_for_path (argv[1]);
+ if (!ostree_repo_stage_directory_to_mtree (repo, arg, mtree, modifier,
+ cancellable, error))
+ goto out;
+ }
if (mode_adds && g_hash_table_size (mode_adds) > 0)
{
set -e
-echo "1..39"
+echo "1..40"
. $(dirname $0)/libtest.sh
$OSTREE show test6 > show-output
assert_file_has_content show-output "commit $checksum1"
echo "ok basic reset"
+
+cd ${test_tmpdir}
+rm checkout-test2 -rf
+$OSTREE checkout test2 checkout-test2
+touch checkout-test2/sometestfile
+$OSTREE commit -s sometest -b test2 checkout-test2
+echo "ok commit with directory filename"